package com.iknow.util.enums;

public enum ColorEnum
{
  public int id = -1;
  public int res;
  public String title = null;

  static
  {
    RED = new ColorEnum("RED", 2, 2, "红色", 2131165189);
    GRAY = new ColorEnum("GRAY", 3, 3, "灰色", 2131165185);
    BLUE = new ColorEnum("BLUE", 4, 4, "蓝色", 2131165187);
    ColorEnum[] arrayOfColorEnum = new ColorEnum[5];
    arrayOfColorEnum[0] = BLACK;
    arrayOfColorEnum[1] = WHITE;
    arrayOfColorEnum[2] = RED;
    arrayOfColorEnum[3] = GRAY;
    arrayOfColorEnum[4] = BLUE;
    ENUM$VALUES = arrayOfColorEnum;
  }

  public static ColorEnum getEnum(int paramInt)
  {
    ColorEnum localColorEnum;
    if (BLACK.id == paramInt)
      localColorEnum = BLACK;
    while (true)
    {
      while (true)
      {
        while (true)
        {
          while (true)
          {
            while (true)
            {
              return localColorEnum;
              if (WHITE.id != paramInt)
                break;
              localColorEnum = WHITE;
            }
            if (RED.id != paramInt)
              break;
            localColorEnum = RED;
          }
          if (GRAY.id != paramInt)
            break;
          localColorEnum = GRAY;
        }
        if (BLUE.id != paramInt)
          break;
        localColorEnum = BLUE;
      }
      localColorEnum = BLACK;
    }
  }

  public static int getEnumIndexByRes(int paramInt)
  {
    ColorEnum[] arrayOfColorEnum = values();
    int i = 0;
    while (true)
    {
      int j;
      if (i >= arrayOfColorEnum.length)
        j = 0;
      while (true)
      {
        return j;
        if (arrayOfColorEnum[i].res != paramInt)
          break;
        j = i;
      }
      ++i;
    }
  }

  public String toString()
  {
    return this.title;
  }
}